package com.study.forumsystemproject.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.Date;
@Data

@Schema(name = "文章回复类", description = "描述论坛系统中的文章回复信息")
public class ArticleReply {
    private Long id;

    @Schema(description = "文章ID", example = "100")
    @NotNull
    private Long articleId;

    @Schema(description = "回复者的原始帖子ID",  example = "200")
    private Long postUserId;

    @Schema(description = "被回复的帖子ID", example = "300")
    private Long replyId;

    @Schema(description = "被回复的用户的ID",  example = "400")
    private Long replyUserId;

    @Schema(description = "回复内容",  example = "这是一个回复")
    @NotNull
    private String content;

    @Schema(description = "点赞数量", example = "10")
    private Integer likeCount;

    @Schema(description = "状态", example = "0") // 假设0表示正常，1表示禁用等
    private Integer state;

    @Schema(description = "删除标志", example = "0") // 假设0表示未删除，1表示已删除
    private Integer deleteFlag;

    @Schema(description = "创建时间", example = "2024-01-01T12:00:00Z")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @Schema(description = "更新时间", example = "2024-01-02T12:00:00Z")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    @Schema(description = "关联用户表")
    private User user;

}